package org.su.webadapter.bind;



import org.su.generalmvc.IEditor;
import org.su.generalmvc.IModel;
import org.su.generalmvc.validate.Errors;

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.lang.reflect.Method;


public class ErrorsEditor implements IEditor {

	public Object getParamValue(String paramName, Class<?> paramType, int paramIndex, Method writer, ServletRequest request,
								ServletResponse response) {
		Object obj = request.getAttribute(IModel.MODEL_DATA);
		if(obj == null){
			obj = new Errors();
			request.setAttribute(IModel.MODEL_DATA,obj);
		}
		return obj;
	}

	public void setParamName(String paramName) {
	}

	
	
}
